.custom-marker {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &:hover {
    transform: scale(1.1);
    
    .marker-label {
      opacity: 1;
    }
  }
  
  &.online .marker-icon {
    background: rgba(82, 196, 26, 0.1);
    border-color: #52c41a;
  }
  
  &.offline .marker-icon {
    background: rgba(245, 34, 45, 0.1);
    border-color: #f5222d;
  }

  .marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #1890ff;
    border-radius: 50%;
    transition: all 0.3s ease;
    overflow: hidden;
    
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: all 0.3s ease;
    }
  }

  .marker-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

.marker-tooltip {
  padding: 8px;

  .tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);

    h4 {
      margin: 0;
      color: white;
      font-size: 14px;
      font-weight: 500;
    }

    .ant-badge-status-text {
      color: rgba(255, 255, 255, 0.85);
    }
  }

  .tooltip-content {
    .sensor-stats {
      display: flex;
      gap: 16px;
      margin-bottom: 12px;

      .stat-item {
        display: flex;
        align-items: center;
        gap: 6px;

        .anticon {
          color: #40a9ff;
          font-size: 16px;
        }

        .label {
          color: rgba(255, 255, 255, 0.65);
        }

        .value {
          color: white;
          font-weight: 500;
        }
      }
    }

    .sensor-location {
      .location-item {
        display: flex;
        margin-bottom: 4px;

        .label {
          color: rgba(255, 255, 255, 0.65);
          width: 45px;
        }

        .value {
          color: white;
          flex: 1;
        }
      }
    }
  }

  .tooltip-actions {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: flex-end;

    .ant-btn-link {
      color: #40a9ff;
      padding: 4px 8px;
      
      &:hover {
        color: #69c0ff;
        background: rgba(64, 169, 255, 0.1);
        border-radius: 4px;
      }

      .anticon {
        font-size: 12px;
      }
    }
  }
}

.marker-tooltip-overlay {
  .ant-tooltip-inner {
    background-color: #1a4a8d;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .ant-tooltip-arrow-content {
    background-color: #1a4a8d;
  }
}

.quick-locate-control {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

  .locate-button {
    width: 100px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;

    &:last-child {
      margin-bottom: 0;
    }

    &:hover {
      transform: scale(1.05);
    }

    .anticon {
      margin-right: 4px;
    }
  }

  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.4);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(24, 144, 255, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(24, 144, 255, 0);
    }
  }

  .locate-button {
    &:active {
      animation: pulse 0.8s;
    }
  }
}

@media screen and (max-width: 768px) {
  .quick-locate-control {
    right: 10px;
    .locate-button {
      width: 80px;
      font-size: 12px;
    }
  }
} 

.map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.map-container {
  position: relative;
  height: 500px;
  
  .amap-container {
    height: 100%;
  }
} 